import { } from 'react'
import MDEditor from '@uiw/react-md-editor';
import { useRequest } from 'ahooks'
import { detailAbout } from '../service/about'
import { usePageTitle } from '@/hooks'
import Loading from '@/components/loading'
import './index.less'

export default function About() {

  usePageTitle("关于")

  const { data : source } = useRequest(async () => {
    const result = await detailAbout({ id: 1 })
    return result.content
  })
  return (
    <>
      {
        source ? (
          <div className="about" data-color-mode="light" style={{ padding: '20px' }}>
            <MDEditor.Markdown
              style={{ padding : "0 0 20px 0"}}
              source={source}
              linkTarget="_blank"
            />
          </div>
        )
        : <Loading />
      }
    </>
    
  )
}